home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60src.lha / Vim / vim60 / src / testdir / test6.in < prev    next >
Encoding:
Text File  |  2000-12-02  |  739 b   |  25 lines

  1. Test for autocommand that redefines the argument list, when doing ":all".
  2.  
  3. STARTTEST
  4. :so small.vim
  5. :au BufReadPost Xxx2 next Xxx2 Xxx1
  6. /^start of
  7. A1:.,/end of/w! Xxx1    " write test file Xxx1
  8. $r2:.,/end of/w! Xxx2     " write test file Xxx2
  9. $r3:.,/end of/w! Xxx3     " write test file Xxx3
  10. :next! Xxx1 Xxx2 Xxx3     " redefine arglist; go to Xxx1
  11. :all                      " open window for all args
  12. :w! test.out              " Write contents of Xxx1
  13. :w >>test.out     " Append contents of last window (Xxx1)
  14. :rew                      " should now be in Xxx2
  15. :w >>test.out             " Append contents of Xxx2
  16. :qa!
  17. ENDTEST
  18.  
  19. start of test file Xxx
  20.     this is a test
  21.     this is a test
  22.     this is a test
  23.     this is a test
  24. end of test file Xxx
  25.